The present invention relates to techniques for managing resources which signal processors such as digital signal processor (DSP) which receive and execute a moduled program use.
The signal processors each employ a circuit composition for repeating an operation at high speeds, so that their operational speeds are greatly improved compared to general-purpose microprocessors, and are widely used for communication, and voice and image processing by utilizing their high speed operations. In a field of audio (music), the digital processors draw attention as apparatus for realizing various sound sources and acoustic effects, which create an atmosphere in which the audience feels as if they were in a concert hall or theater based on, reflected musical sounds (echoes).
The signal processors each execute a required program to obtain an expected process. When the use of the program is predetermined, it can be stored beforehand, for example, in a ROM provided in the processor. Most of the signal processors, however, receive a program transferred externally, store it in a RAM, and then executes it in order that the signal processor can perform various operations depending on the situation by changing the transferred program.
The signal processor is often caused to effect a plurality of different functions. For example, when the signal processor is used to add acoustic effects to a musical sound, various acoustic effects such as compressor, distortion or chorus can be added individually to the musical sound, and some of them can often be added simultaneously to the musical sound.
Such a combination of functions (in the above example, a combination of acoustic effects) is required to be considered. Thus, if a program is prepared for the contents of each possible processing (each combination of acoustic effects), the total number of programs required would be immense. In order to avoid this, there are two measures: one is to prepare a program to execute a selected part of the contents of a possible process, and the other is to prepare a program moduled so as to realize a particular function. However, in the former method, the number of combinations of functions realized by the prepared program is limited and the number of user""s choices is limited. Thus, when it is important to increase the number of user""s choices, the latter method is often employed. In the latter method, by the changing the number and kinds of programs to be transferred, the signal processor is capable of realizing not only one function but also various high general-purpose functions, and the number of programs to be prepared is reduced, advantageously.
The program is generally arranged to perform some operation on input target data, and then outputs the result of the processing. As well known, resources such as storage devices from and to which data is read and input, and storage devices to and from which the processed data is stored and output are used in the execution of the program are beforehand defined in the program. The kinds of programs to be executed and a sequence of execution of the programs change depending on the situation. This implies that a location where data processed by a next program is stored changes depending on a program executed last. Thus, conventionally, an auxiliary program which effects transfer of data between programs, that is, a program for transferring data written in a particular area by executing a program to an area where a next program reads the data is prepared (other programs can be hereinafter referred to as a functional program). Thus, the functional and auxiliary programs are conventionally transferred to the signal processor, for example, as follows.
The programs to be transferred to the signal processor are generally stored in a non-volatile recording medium such as a ROM or a magnetic disk. A controller which transfers programs to a signal processor such as a CPU specifies a functional program to be transferred based on the contents of processing which the signal processor effects, and an auxiliary program which effects transfer of data between functional programs which are executed in an undetermined sequence based on the kinds of the functional programs. The controller reads out from the storage medium the functional and auxiliary programs specified so, and transfers them to the signal processor in the order in which the auxiliary program intervenes between the functional programs in order that the signal processor sequentially executes the functional and auxiliary programs in that order to transfer data between the functional programs.
Since the kinds and order of execution of the functional programs cannot be determined beforehand, resources (areas) to be used in execution of the respective functional programs are defined so as not to erase the results of processing of other functional programs. It is defined that a different resource is used for each functional program. In the past, a large amount of memory is prepared as a resource usable for the signal processor to execute functional programs which use different resources.
However, when execution of a functional program has been completed, the resource (area in a memory) used is not generally used after the data written in the area is read out. In the past, the large amount of memory for the signal processor is prepared to insure an area to be used temporarily. Thus, most of usable resources are often used uselessly and the efficiency of use of the resources is low, undesirably.
In the past, an auxiliary program is prepared for transferring data between functional programs, as described above. The auxiliary program is transferred to the signal processor and stored in its memory. Thus, the signal processor must have a large capacity of memory so as to store the auxiliary program, which would lead to an increase in the manufacturing cost of the signal processor and an increase in a load on the signal processor. Therefore, the above-mentioned problems, which are liable to occur when the signal processor is desired to maintain high versatility, are strongly desired to be solved.
It is therefor an object of the present invention to cause a signal processor to maintain high versatility and to improve the efficiency of use of resources which the signal processor requires.
According to one aspect of the present invention, there is provided a resource managing apparatus for a signal processor, the apparatus managing a storage area of first storage means of the signal processor which stores a plurality of programs each of which controls a process executed by the signal processor, the apparatus comprising:
program reading means for reading out a program to be transferred to the first storage means of the signal processor from second storage means which contains a plurality of types of programs;
instruction changing means for changing the contents of a particular one of instructions which composes the program read out by the program reading means; and
transferring means for transferring the program composed by the instructions which include the particular instruction whose contents were changed by the instruction changing means to a specified storage area of the first storage means.
According to another aspect of the present invention, there is provided a resource managing apparatus for a signal processor for managing a storage area of first storage means of the signal processor which contains a plurality of programs each of which controls a process executed by the signal processor, the apparatus comprising:
program specifying means for specifying one of a plurality of programs stored in the first storage means;
program reading means for reading out a program to be transferred to the first storage means of the signal processor from second storage means which contains a plurality of types of programs;
first instruction changing means for changing the contents of an instruction of the program read out by the program reading means so as to be allocated to the storage area of the first storage means allocated to the program specified by the program specifying means; and
transferring means for transferring the program which involves the instruction whose contents are changed by the instruction changing means to the storage area of the first storage means allocated to the program specified by the program specifying means.
According to this construction, when a program to be transferred to the signal processor is determined, the contents of a particular one of the instructions which composes the program are changed and transferred to the signal processor to manage the storage area of a memory which the signal processor uses in the execution of the respective programs. Thus, the storage area of the same memory is used at least to transfer and store data between the programs. Thus, the memory is used effectively and the signal processor can execute the program, using a reduced memory capacity.
Similarly, the present invention provides a method of managing resources for the signal processors and a program, which manages resources for the signal processor, using a computer.